package com.itcast.googleplay.protocol;

import java.util.List;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.itcast.googleplay.domain.AppInfo;

public class AppProtocol extends BaseProtocol<List<AppInfo>>{

	@Override
	public List<AppInfo> processData(String json) {
		Gson gson = new Gson();
		//把应用模块的json封装在List<AppInfo>集合中,new TypeToken<List<AppInfo>>(){}.getType()将数据封装在List<AppInfo>集合中
		return gson.fromJson(json, new TypeToken<List<AppInfo>>(){}.getType());
	}

}
